package com.SmartCampus.system.service.impl;

import com.SmartCampus.system.mapper.ActivityMapper;
import com.SmartCampus.system.model.dto.activity.ActivityQueryRequest;
import com.SmartCampus.system.model.entity.Activity;
import com.SmartCampus.system.service.ActivityService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
* @author wangliang
* @description 针对表【activity(完满活动表)】的数据库操作Service实现
* @createDate 2024-12-26 18:54:38
*/
@Service
public class ActivityServiceImpl extends ServiceImpl<ActivityMapper, Activity>
    implements ActivityService {

    @Override
    public Page<Activity> getActivityByAll(Page<Activity> page, ActivityQueryRequest activityQueryRequest) {
        QueryWrapper<Activity> queryWrapper = new QueryWrapper<>();
        return page(page, queryWrapper);
    }

    @Override
    public Page<Activity> getActivityByMy(Page<Activity> page, ActivityQueryRequest activityQueryRequest, String username) {
        QueryWrapper<Activity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("organizer", username);
        return page(page, queryWrapper);
    }
}




